<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>霞客约车</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="${ctxStatic }/wx/mui/css/mui.min.css" rel="stylesheet" />
		<script src="${ctxStatic }/wx/mui/js/mui.min.js"></script>
		<script src="${ctxStatic }/zepto/zepto.min.js"></script>
		<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<link rel="stylesheet" href="${ctxStatic }/wx/css/home.css" />
		<link rel="stylesheet" href="${ctxStatic }/wx/css/xiaketotal.css" />
		<script type="text/javascript">var path = "${pageContext.request.contextPath}";</script>
		<script type="text/javascript">var img = "${ctxStatic }";</script>
		<script type="text/javascript" src="${ctxStatic }/wxshare/index.js"></script>
		<script type="text/javascript" charset="utf-8" src="${ctxStatic }/wxshare/host.js"></script>
		<script type="text/javascript" charset="utf-8">
      		mui.init();
    	</script>
	</head>
         <style>
         	html{background: #fff;}
         	.mui-slider .mui-slider-group .mui-slider-item img{
         		float: left;
         	}
         </style>
<body>
		 <header class="mui-bar mui-bar-nav" style="background: #16c59b;" id="xiakeh1">
		     <a class="mui-icon mui-icon-location mui-navigate-left" style="color: #fff;float:left"></a>
		     <span class="xkh-date" style="color:#fff;font-size:14px;float:left;line-height:44px;" id="city"></span>
		     <h1 class="mui-title" style="color: #fff;">霞客约车</h1>
		     <a class="mui-icon mui-icon-upload" style="color: #fff;float: right;" id="share"></a>
		 </header>
		<div class="mui-content home-wrap">
				<div id="slider" class="mui-slider" >
			<div class="mui-slider-group mui-slider-loop">
				<!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
				<div class="mui-slider-item mui-slider-item-duplicate">
					<img src="https://www.xiakeyueche.com${sysAds2 }"> 
				</div>
				<!-- 第一张 -->
				<div class="mui-slider-item ">
						<img src="https://www.xiakeyueche.com${sysAds0 }" class="cjpc">
				</div>
				<!-- 第二张 -->
				<div class="mui-slider-item">
						<img src="https://www.xiakeyueche.com${sysAds1 }">
				</div>
				<!-- 第三张 -->
				<div class="mui-slider-item">
						<img src="https://www.xiakeyueche.com${sysAds2 }">
				</div>
				<!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
				<div class="mui-slider-item mui-slider-item-duplicate">
						<img src="https://www.xiakeyueche.com${sysAds0 }" class="cjpc">
				</div>
			</div>
			<div class="mui-slider-indicator">
				<div class="mui-indicator mui-active"></div>
				<div class="mui-indicator"></div>
				<div class="mui-indicator"></div>
			</div>
			</div> 
			<div class="home-tab">
                  <div class="mui-row">
                  	    <div class="mui-col-xs-4 ixiake_list_box">
                  	    	<a href="${ctxWx}/pu/travelIndex" class="ixiake_list">
                  	    		 <div class="xk_l_img">
                  	    		 	<img src="${ctxStatic}/wx/img/day_img/lvbc@2x.png" />
                  	    		 </div>
                  	    		 <p>旅游包车</p>
                  	    	</a>
                  	    </div>
                  	    <div class="mui-col-xs-4 ixiake_list_box">
                  	    	<a href="${ctxWx}/pu/dayIndex" class="ixiake_list">
                  	    		 <div class="xk_l_img">
                  	    		 	<img src="${ctxStatic}/wx/img/day_img/atbc@2x.png" />
                  	    		 </div>
                  	    		 <p>按天包车</p>
                  	    	</a>
                  	    </div>
                  	    <div class="mui-col-xs-4 ixiake_list_box">
                  	    	<a href="${ctxWx}/share/shareList" class="ixiake_list">
                  	    		 <div class="xk_l_img">
                  	    		 	<img src="${ctxStatic}/wx/img/day_img/aapc@2x.png" />
                  	    		 </div>
                  	    		 <p>AA拼车</p>
                  	    	</a>
                  	    </div>
                  </div>
                  <div class="mui-row">
                  	    <div class="mui-col-xs-4 ixiake_lt_box">
                  	    	<a href="${ctxWx}/pu/airIndex" class="ixiake_list">
                  	    		 <div class="xk_l_img">
                  	    		 	<img src="${ctxStatic}/wx/img/day_img/jsj@2x.png" />
                  	    		 </div>
                  	    		 <p>接送机</p>
                  	    	</a>
                  	    </div>
                  	    <div class="mui-col-xs-4  ixiake_lt_box">
                  	    	<a href="javascript:void(o)" class="ixiake_list" id="cus">
                  	    		 <div class="xk_l_img">
                  	    		 	<img src="${ctxStatic}/wx/img/day_img/jzbc@2x.png" />
                  	    		 </div>
                  	    		 <p>定制包车</p>
                  	    	</a>
                  	    </div>
                  	    <div class="mui-col-xs-4 ixiake_lt_box">
                  	    	<a href="${ctxWx}/pu/tripIndex" class="ixiake_list">
                  	    		 <div class="xk_l_img">
                  	    		 	<img src="${ctxStatic}/wx/img/day_img/xcgw@2x.png" />
                  	    		 </div>
                  	    		 <p>行程顾问</p>
                  	    	</a>
                  	    </div>
                  </div>
			</div>
            <div class="xkh-hot">
            	<i class="hot-ico"></i>
            	<span>旅游包车</span>
            	<a href="${ctxWx}/pu/travelIndex" class="more-ico"></a>
            </div>
            <div class="list-m-box">
            </div>
		</div>

	<nav class="mui-bar mui-bar-tab">
		<a class="mui-tab-item <c:if test='${pageStyle == indexPage}'>mui-active</c:if> " data-url="${ctxWx}/pu/index"> <span
			class="mui-icon mui-icon-home"></span> <span class="mui-tab-label">首页</span>
		</a> <a class="mui-tab-item" data-url="${ctxWx}/orders/orderList"> <span
			class="mui-icon mui-icon-list"> </span> <span class="mui-tab-label">订单</span>
		</a> <a class="mui-tab-item" data-url="${ctxWx}/my/myInfoPage"> <span
			class="mui-icon mui-icon-contact"></span> <span class="mui-tab-label">我的</span>
		</a>
	</nav>
</body>
<script type="text/javascript">
$(function(){
	$('.mui-tab-item').on('tap', function() {
		if ($(this).attr('data-url') != '') {
			if(isWeiXin()){ //微信打开
				window.location.href = $(this).attr('data-url');
			} else{
				window.location.href = $(this).attr('data-url')+"?type=notwx";
			}
		};
	}); 
	$('.cjpc').on('tap', function() {
		window.location.href="${ctxWx}/share/shareList";
	})
	$('#cus').on('tap', function() {
		if(isWeiXin()){ //微信打开
			window.location.href = "${ctxWx}/custom/customIndex";
		} else{
			window.location.href = "${ctxWx}/custom/customIndex?type=notwx";
		}
	}); 
	//获得slider插件对象
	var slider = mui(".mui-slider");
	slider.slider({
		interval: 5000
	}); 
	mui.get('${ctxFront}/sms/ipLocation', function(data) {
		//根据ip定位,得到城市名
		var cityName = document.getElementById("city");
		cityName.innerText = data; 
	});
	mui.post('${ctxFront}/mobile/getHotTravelList', {
		'departcity.sitename':"",
		rentType:'5',
		tabType:'周边游包车',
		ishot:'1',
		type:"wx"
	}, function(data) {
		var sm = data.data.rentGroupList;
		var table = document.querySelector('.list-m-box');
		for (var i=0;i<sm.length;i++) {
				var li = document.createElement("div");
				li.className = "l-m-il";
				var str = "";
				var pic = sm[i].tLine.linepic;
				var linename = sm[i].productname;
				var lowestPrice = sm[i].lowestPrice;
                str += "<div class='l-m-ii'>";
        	 	str += "<a href='${ctxWx }/rentproduct/getTravelDetail?rentgrpid="+sm[i].rentgrpid+"&departcity="+sm[i].departcity.siteid+"&destcity="+sm[i].destcity.siteid+"&linename="+sm[i].tLine.linename+"&lowestPrice="+sm[i].lowestPrice+"&linepic="+sm[i].tLine.linepic+"&daysnum="+sm[i].daysnum+"' class='ilm-box'>";
        	 	str += "<div class='ilm-img'>";
        	 	str += "<img src=https://www.xiakeyueche.com"+pic+"/>";
        	 	str += "</div>";
        	 	str += "<div class='ilm-txt'>";
        	 	str += "<span class='mui-col-xs-9'>"+linename+"</span>";
        	 	str += "<span class='mui-col-xs-3'><font style='font-weight: 600;'>￥</font>"+lowestPrice+"</span>";
        	 	str += "</div>";
        	 	str += "</a>";
        	 	str += "</div>";
        	 	
        	 	li.innerHTML = str;
                table.appendChild(li);
			}
	}, 'json');
});
function isWeiXin(){ 
	var ua = window.navigator.userAgent.toLowerCase(); 
		if (ua.match(/MicroMessenger/i) == 'micromessenger') { 
			return true;
		} else { 
			return false;
		} 
} 
</script> 
</html>